const express=require('express');
const app=express();
app.use(express.static(('./static')));
const router=express.Router();
app.use(router);
const bodyParser=require('body-Parser');
router.use(bodyParser.urlencoded({extended:false}));
const fs=require('fs');



router.get('/s2',(req,res)=>{
    let cd=req.query.cd
    fs.readFile(__dirname+'/data/stu.json',(err,data)=>{
        res.send(`var ${cd}=${data}`)
    });
});



app.listen(4019);